#import <Foundation/Foundation.h>
#if __has_include(<AYBLECore/AYBLEDeviceType.h>)
#import <AYBLECore/AYBLEDeviceType.h>
#else
#import "AYBLEDeviceType.h"
#endif

NS_ASSUME_NONNULL_BEGIN

@class CBPeripheral;
@interface AYBLEDevice : NSObject

@property (nonatomic, strong, readonly) CBPeripheral *peripheral;

///< 设备名称
@property (nonatomic, copy, readonly) NSString *name;

///< 设备mac地址
@property (nonatomic, copy, readonly) NSString *mac;

@property (nonatomic, copy) NSString *sn;

@property (nonatomic, copy, readonly) NSString *mac_format;

///< 设备是否绑定
@property (nonatomic, assign, readonly) BOOL binded;

@property (nonatomic, assign, readonly) AYBLEDeviceMatchType match_num;

@property (nonatomic, assign, readonly) NSInteger manufaturer_id;

- (instancetype)initWithAdvertisementData:(NSDictionary *)advData peripheral:(CBPeripheral *)peripheral prefixes:(NSArray<NSString *> *)prefixes;

@end

NS_ASSUME_NONNULL_END
